package goods.api;

import goods.model.Goods;
import goods.model.Product;
import goods.model.ProductCategory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * Created by xhz on 2017/1/19.
 * 店铺商品详情页接口
 */
public interface ProductDetailsApi {

    /**
     * 根据商品id查询商品
     * @param goodId
     * @return
     */
    public Goods findGoodsById(String goodId);

    /**
     * 根据产品查询商品
     * @param goodsCommonQueryMap
     * @param product
     * @return
     */
    public List<Goods> findGoodsByIsDeleteAndStateAndProduct(Map<String,Object> goodsCommonQueryMap, Product product);

    /**
     * 查询最新商品
     * @param pageable
     * @return
     */
    public Page<Goods> findGoodsByIsDeleteAndStateAndStoreIdIn(Map<String,Object> goodsCommonQueryMap,Pageable pageable);

    /**
     * 根据产品、商品分类查询商品
     * @return
     */
    Page<Goods> findGoodsByIsDeleteAndStateAndStoreIdInAndProduct_ProductCategory(Map<String,Object> queryMap, ProductCategory productCategory, Pageable pageable);

    /**
     * 根据类别查询产品
     * @param productCategory
     * @param pageable
     * @return
     */
    public Page<Product> findProductByProductCategory(ProductCategory productCategory, Pageable pageable);

    /**
     * 根据产品id获取产品信息
     * @param productId
     * @return
     */
    public Product findProductById(String productId);
}
